Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: creating queries and features, implementing on expenses, changed clippy allows to expect with reasons #140

Merged
merged 18 commits into from
Sep 30, 2024

Conversation

nicolasauler
Copy link
Collaborator

@nicolasauler nicolasauler commented Sep 28, 2024

Description

This PR starts the migration into an organized architecture, which will go something like:

  1. Database layer / Client layer
  2. Features layer
  3. Routing layer (where features are called and serialized accordingly to the API, if it's our data api, serialized into JSON, if it's our hypermedia layer, into a Response like HTML with headers and status codes).

Also, having this separation allowed us to begin testing, and this PR demonstrates this with the test of the create expense feature.

It also configures CI for testing, by provisioning a postgres database.

Finally, it uses the clippy expects and reasons that were stabilized in Rust 1.81 I think.

ToDo

  • Build mailer as a client on app state, so we build it on boot, or in a lazy way, instead of building it on every send call. This will also allow for mocking a Mailer on tests: build a mailer client on app state #141

Related issues

closes: #139

Starts resolving:

@nicolasauler nicolasauler force-pushed the clippy-expect branch 3 times, most recently from 6d0666c to 841d192 Compare September 29, 2024 16:37
@nicolasauler nicolasauler self-assigned this Sep 29, 2024
@nicolasauler nicolasauler changed the title wip: creating queries and features, started changing clippy allows feat: creating queries and features, implementing on expenses, changed clippy allows to expect with reasons Sep 29, 2024
@nicolasauler nicolasauler marked this pull request as ready for review September 29, 2024 16:47
Copy link

codecov bot commented Sep 29, 2024

@nicolasauler nicolasauler force-pushed the clippy-expect branch 4 times, most recently from 6353924 to 0f6a7ed Compare September 30, 2024 02:37
@nicolasauler nicolasauler merged commit 956459d into main Sep 30, 2024
7 checks passed
@nicolasauler nicolasauler deleted the clippy-expect branch September 30, 2024 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use expect and reasons on clippy allows
1 participant